<!-- 
  @Created by   on 2019-6-18 14:37:06.
  @updated by
  @description 剧本-公安信息
-->
<div>
  <yu-xform related-table-name="refTable" form-type="search">
    <yu-xform-group :column="4">
      <yu-xform-item :placeholder="$t('publicSecurityInfo.xm')" name="name" ctype="input"></yu-xform-item>
      <yu-xform-item :placeholder="$t('publicSecurityInfo.zjhm')" name="certCode" ctype="input"></yu-xform-item>
    </yu-xform-group>
  </yu-xform>
  <div class="yu-toolBar">
    <yu-button-group>
      <yu-button icon="plus" @click="addFn">{{ $t('publicSecurityInfo.xz') }}</yu-button> 
      <yu-button icon="yx-bin" @click="deleteFn">{{ $t('publicSecurityInfo.sc') }}</yu-button>
      <yu-button icon="yx-bin" @click="modifyFn">{{ $t('publicSecurityInfo.xg') }}</yu-button>
    </yu-button-group>
  </div>
  <yu-xtable ref="refTable" row-number :data-url="dataUrl">
    <yu-xtable-column :label="$t('publicSecurityInfo.xm')" prop="name" ></yu-xtable-column>
    <yu-xtable-column :label="$t('publicSecurityInfo.zjlx')" prop="certType" :options="certType"></yu-xtable-column>
    <yu-xtable-column :label="$t('publicSecurityInfo.zjhm')" prop="certCode" ></yu-xtable-column>
    <yu-xtable-column :label="$t('publicSecurityInfo.zt')" prop="status" :options="psStatus"></yu-xtable-column>
  </yu-xtable>
  <!-- 说明dialog可配置宽高属性，若不配置则宽度默认为屏幕50%，高度自适应
      width="650px" height="380px" -->
  <yu-xdialog :title="viewTitle[viewType]" :visible.sync="dialogVisible" width="650px">
    <yu-xform ref="refForm" label-width="100px" v-model="formdata" :disabled="formDisabled">
      <yu-xform-group>
        <yu-xform-item :label="$t('publicSecurityInfo.xm')" name="name" rules="required" ctype="input" :disabled="itemDisabled"></yu-xform-item>
        <yu-xform-item :label="$t('publicSecurityInfo.zjlx')" name="certType" rules="required" ctype="select" :options="certType" :disabled="itemDisabled"></yu-xform-item>
        <yu-xform-item :label="$t('publicSecurityInfo.zjhm')" name="certCode" rules="required" ctype="input" :disabled="itemDisabled"></yu-xform-item>
        <yu-xform-item :label="$t('publicSecurityInfo.zt')" name="status" rules="required" ctype="select" :options="psStatus"></yu-xform-item>
      </yu-xform-group>
      <div class="yu-grpButton">
        <yu-button v-show="saveBtnShow" icon="check" type="primary" @click="saveFn">{{ $t('publicSecurityInfo.bc') }}</yu-button>
        <yu-button icon="yx-undo2" @click="cancelFn">{{ $t('publicSecurityInfo.qx') }}</yu-button>
      </div>
    </yu-xform>
  </yu-xdialog>
</div>
